<?php
class Company extends BaseBean{

    public $_table= "tb_company";
	public $_primarykey= "id";
	public $_table_alias= "a";
	public $_mustFields =array("code"=>"公司编号","name"=>"公司名称");
	public $_uniqueFields =array("a.code"=>"公司编号");



	public function generateSql(){
        return "select a.*,b.name as area from tb_company a left join tb_areas b on a.area_id=b.id";
    }

}
?>